﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Employee/EmployeeMaster.Master"
    AutoEventWireup="true" CodeBehind="ViewRequistion.aspx.cs" Inherits="LogicUniversity.Employee.ViewRequistion" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxtoolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="http://code.jquery.com/jquery-1.10.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            //            console.log($('#navigation a').length);
            //            $('#navigation li').removeClass('active');
            //            $('#navigation li:last').addClass('active');

            $('.nav li a').each(function () {
                if ($(this).text() == 'View Request') {
                    $(this).parent().addClass('active');
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <form id="form1" runat="server">
    <ajaxtoolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </ajaxtoolkit:ToolkitScriptManager>
    <div class="row-fluid">
        <div class="span3 offset4">
            <h5>
                Weekly Requisition History</h5>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span4 offset2">
            <asp:Label ID="lblFrom" runat="server" Text="From : "></asp:Label>
            <asp:TextBox ID="fromDate" required="required" runat="server"></asp:TextBox>
            <asp:LinkButton ID="btnFromCal" runat="server"><i class="icon-calendar"></i></asp:LinkButton>
            
            <ajaxtoolkit:CalendarExtender PopupButtonID="btnFromCal" ID="TextBox1_CalendarExtender" runat="server" TargetControlID="fromDate">
            </ajaxtoolkit:CalendarExtender>
        </div>
        <div class="span4">
            <asp:Label ID="lblTo" runat="server" Text="To : "></asp:Label>
            <asp:TextBox ID="toDate" required="required" runat="server"></asp:TextBox>
            <asp:LinkButton ID="btnToCal" runat="server"><i class="icon-calendar"></i></asp:LinkButton>
            <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
            
            <ajaxtoolkit:CalendarExtender PopupButtonID="btnToCal" ID="CalendarExtender1" runat="server" TargetControlID="toDate">
            </ajaxtoolkit:CalendarExtender>
        </div>
    </div>
    <br />
    <div class="row-fluid">
        <div class="span3 offset2">
            <asp:Button CssClass="btn btn-primary" ID="btnSelect" runat="server" Text="Select"
                Enabled="true" OnClick="btnSelect_Click" />
        </div>
    </div>
    <br />
    <div class="row-fluid">
        <div class="span6 offset2">
            <asp:Label ID="lblMsg" runat="server" Font-Bold="true"></asp:Label><br />
            <asp:GridView GridLines="None" CssClass="table table-hover" ID="RequestsView" 
                runat="server" AutoGenerateColumns="False">
                <Columns>
                    <asp:BoundField HeaderText="Req ID" DataField="Requisition_ID" />
                    <asp:BoundField DataField="Requested_Date" HeaderText="Requested Date" />
                    <asp:BoundField DataField="Status" HeaderText="Status" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton CommandArgument='<%#Eval("Requisition_ID") %>' 
                                ID="lnkViewDetail" runat="server" onclick="lnkViewDetail_Click">View Detail</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>
    </form>
</asp:Content>
